<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.prime.com.tr/ui">

<ui:composition>
	<h:form id="formListagem">
		<h:panelGrid id="listaItems">
			<p:dataTable id="tabelaItems" var="beanItem"
				value="#{pedidoControle.listaInfosItem}" paginator="true" rows="5">

				<f:facet name="header">
					<h:outputLabel value="#{pedidoControle.tituloPagina}" />
				</f:facet>

				<f:facet name="footer">
				</f:facet>

				<p:column filterBy="#{beanItem.produto.produto}">
					<f:facet name="header">
						<h:outputText value="#{msg.produto}" />
					</f:facet>
					<h:outputText value="#{beanItem.produto.produto}" />
				</p:column>

				<p:column>
					<f:facet name="header">
						<h:outputText value="#{msg.itemPedidoQuantidade}" />
					</f:facet>
					<h:outputText value="#{beanItem.quantidade}" />
				</p:column>

				<p:column>
					<h:panelGroup>
						<h:commandLink action="#{pedidoControle.adicionarItem2}">
							<h:graphicImage library="imagens" name="editar16a.png"
								style="border:0" />
							<h:outputText value="#{msg.geralLinkAlterar}" />
						<f:ajax execute="@form" render=":formListagem" />
							<f:setPropertyActionListener
								target="#{pedidoControle.infoBeanItem}" value="#{beanItem}" />
						</h:commandLink>
						<h:outputText value="  " />
						<h:commandLink action="#{pedidoControle.preparaEliminar}">
							<h:graphicImage library="imagens" name="deletar16a.png"
								style="border:0" />
							<h:outputText value="#{msg.geralLinkEliminar}" />
							<f:setPropertyActionListener
								target="#{pedidoControle.infoBeanItem}" value="#{beanItem}" />
						</h:commandLink>
					</h:panelGroup>
				</p:column>
			</p:dataTable>
		</h:panelGrid>
	</h:form>
</ui:composition>
</html>